
#include "gmatlab.h"

// void g_irepository_matlab_release_info(GIBaseInfo *info);
void mexFunction(int nlhs, mxArray *lhs[], int nrhs, const mxArray *rhs[])
{
  GIBaseInfo *info;

  // Check and convert arguments
  if (nrhs != 1) g_matlab_error("gmatlab:numArg", "g_irepository_matlab_release_info() takes 1 argument");
  if (nlhs != 0) g_matlab_error("gmatlab:numRet", "g_irepository_matlab_release_info() has 0 return values");
  if (mxGetNumberOfElements(rhs[0]) != 1) g_matlab_error("gmatlab:badArray", "g_irepository_matlab_release_info() Arg 1 must have one element");
  if (mxGetClassID(rhs[0]) != MX_GPOINTER)
    g_matlab_error("gmatlab:badArray", "g_irepository_matlab_release_info() Arg 1 must be int, not %s", mxGetClassName(rhs[0]));
  info = ((gpointer*)mxGetData(rhs[0]))[0];
  
  // Call function
  TRACE("g_irepository_matlab_release_info(%ld)", info);
  if (info) g_base_info_unref(info);
  
  // Prepare return value
}
